package org.apache.dubbo.demo.consumer.test.spi;

import org.apache.dubbo.common.extension.ExtensionLoader;

public class Car$Adaptive implements org.apache.dubbo.demo.consumer.test.spi.Car {
    public void run(org.apache.dubbo.common.URL arg0) {
        if (arg0 == null) throw new IllegalArgumentException("url == null");
        org.apache.dubbo.common.URL url = arg0;
        String extName = url.getParameter("carType");
        if (extName == null)
            throw new IllegalStateException("Failed to get extension (org.apache.dubbo.demo.consumer.test.spi.Car) name from url (" + url.toString() + ") use keys([carType])");
        org.apache.dubbo.demo.consumer.test.spi.Car extension = (org.apache.dubbo.demo.consumer.test.spi.Car)
                ExtensionLoader.getExtensionLoader(org.apache.dubbo.demo.consumer.test.spi.Car.class).getExtension(extName);
        extension.run(arg0);
    }

    public void run() {
        throw new UnsupportedOperationException("The method public abstract void org.apache.dubbo.demo.consumer.test.spi.Car.run() of interface org.apache.dubbo.demo.consumer.test.spi.Car is not adaptive method!");
    }
}